﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Error.aspx.cs" Inherits="View_Utils_Error" %>
<%@ Import Namespace="Utils.Model" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<%Holder<string> errorModel = (Holder<string>)ActionResult["errorModel"]; %>
<head>
    <title><%="utils_error"^Resource%></title>
    <link rel="Stylesheet" href="/css/layout.css" />
</head>
<body>
<div><a href="/Home/Index"><img src="/Img/log.png" width="250px" height="70px" alt="Weblnks"/></a></div>
<%if (errorModel != null)
{ %>
<div class="caption"><%="utils_error_msg" ^ Resource%></div>
<div>
<%    
  int i = 0;
  while (errorModel.HasNext)
  {%>
  <%if (i > 0)
    { %>
    <%=new string('-', i*2)%>&gt;
  <%} %>
  <%=errorModel.Current()%><br/>
<%errorModel.MoveNext(); i++;
  } %>
</div>

<%Element vars = (Element)errorModel["vars"]; %>
<%if ( vars != null && !vars.IsNamesEmpty )
  {%>
<div class="caption"><%="utils_error_vars" ^ Resource%></div>
<table>
<%foreach (string name in vars.Names)
  { %>
<tr>
<td><%=name%>==&gt;<%=vars[name]%></td>
</tr>
<%} %>
</table>
<%}%>
<div class="caption"><%="utils_error_trace" ^ Resource%></div>
<div><%="trace" ^ errorModel%></div>
<%}%>
<hr class="span"/>
    <div class="bottom">
        <a href="/Home/Index.axd"><%="home_index" ^ Resource%></a>
    </div>
</body>
</html>
